FROM java:8-jre
# Set the timezone.
RUN echo "Asia/Chongqing" > /etc/timezone
RUN dpkg-reconfigure -f noninteractive tzdata
# Make logs dir
RUN mkdir -p /opt/code-generator
# Add the jar and run
ADD target/code-generator-0.0.1-SNAPSHOT.jar /opt/code-generator/app.jar
WORKDIR /opt/code-generator
ENTRYPOINT ["java","-XX:+UseG1GC","-XX:MaxGCPauseMillis=100","-XX:+HeapDumpOnOutOfMemoryError", "-XX:HeapDumpPath=/logs/ewms/code-generator/heap","-Djava.security.egd=file:/dev/./urandom","-jar","app.jar"]
EXPOSE 18902